package com.ai.nsa;

import com.ai.nsa.inputer.Inputer;

import java.util.Map;

/**
 * @author Feng Chen 2017/6/19.
 */
public class NSAInputers {

    private Map<String, Inputer> inputers;

    public Map<String, Inputer> getInputers() {
        return inputers;
    }

    public void setInputers(Map<String, Inputer> inputers) {
        this.inputers = inputers;
    }

    public Inputer get(String interact) {

        if (!inputers.containsKey(interact)) {
            throw new NSAException("Unknown Inputer for " + interact);
        }

        return inputers.get(interact);
    }

}
